.class Lcom/estrongs/android/pop/app/FileChooserActivity$e;
.super Ljava/lang/Object;
.source "FileChooserActivity.java"

# interfaces
.implements Landroid/content/DialogInterface$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/estrongs/android/pop/app/FileChooserActivity;->onCreate(Landroid/os/Bundle;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic a:Lcom/estrongs/android/pop/app/FileChooserActivity;


# direct methods
.method constructor <init>(Lcom/estrongs/android/pop/app/FileChooserActivity;)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/estrongs/android/pop/app/FileChooserActivity$e;->a:Lcom/estrongs/android/pop/app/FileChooserActivity;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/content/DialogInterface;I)V
    .locals 4

    .line 1
    iget-object p1, p0, Lcom/estrongs/android/pop/app/FileChooserActivity$e;->a:Lcom/estrongs/android/pop/app/FileChooserActivity;

    iget-object p1, p1, Lcom/estrongs/android/pop/app/FileChooserActivity;->d:Lcom/estrongs/android/widget/c;

    invoke-virtual {p1}, Lcom/estrongs/android/widget/c;->b()Ljava/lang/String;

    move-result-object p1

    .line 2
    iget-object p2, p0, Lcom/estrongs/android/pop/app/FileChooserActivity$e;->a:Lcom/estrongs/android/pop/app/FileChooserActivity;

    invoke-virtual {p2}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;

    move-result-object p2

    const-string v0, "tplink-file-save"

    invoke-virtual {p2, v0}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p2

    const/4 v0, 0x0

    if-eqz p2, :cond_0

    .line 3
    new-instance v1, Ljava/io/File;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v3, "/"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 4
    invoke-virtual {v1}, Ljava/io/File;->exists()Z

    move-result v1

    if-eqz v1, :cond_0

    .line 5
    new-instance p1, Lcom/estrongs/android/ui/dialog/q;

    iget-object v1, p0, Lcom/estrongs/android/pop/app/FileChooserActivity$e;->a:Lcom/estrongs/android/pop/app/FileChooserActivity;

    invoke-direct {p1, v1}, Lcom/estrongs/android/ui/dialog/q;-><init>(Landroid/content/Context;)V

    .line 6
    iget-object v1, p0, Lcom/estrongs/android/pop/app/FileChooserActivity$e;->a:Lcom/estrongs/android/pop/app/FileChooserActivity;

    const v2, 0x7f1102e5

    invoke-virtual {v1, v2}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p1, v1}, Lcom/estrongs/android/ui/dialog/q;->setTitle(Ljava/lang/CharSequence;)V

    .line 7
    iget-object v1, p0, Lcom/estrongs/android/pop/app/FileChooserActivity$e;->a:Lcom/estrongs/android/pop/app/FileChooserActivity;

    const v2, 0x7f11043f

    invoke-virtual {v1, v2}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v1

    const/4 v2, 0x1

    new-array v2, v2, [Ljava/lang/Object;

    const/4 v3, 0x0

    aput-object p2, v2, v3

    invoke-static {v1, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p2

    .line 8
    invoke-virtual {p1, p2}, Lcom/estrongs/android/ui/dialog/q;->setMessage(Ljava/lang/CharSequence;)V

    .line 9
    iget-object p2, p0, Lcom/estrongs/android/pop/app/FileChooserActivity$e;->a:Lcom/estrongs/android/pop/app/FileChooserActivity;

    const v1, 0x7f1102a2

    invoke-virtual {p2, v1}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object p2

    new-instance v1, Lcom/estrongs/android/pop/app/FileChooserActivity$e$a;

    invoke-direct {v1, p0, p1}, Lcom/estrongs/android/pop/app/FileChooserActivity$e$a;-><init>(Lcom/estrongs/android/pop/app/FileChooserActivity$e;Lcom/estrongs/android/ui/dialog/q;)V

    invoke-virtual {p1, p2, v1}, Lcom/estrongs/android/ui/dialog/q;->setConfirmButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/widget/Button;

    .line 10
    iget-object p2, p0, Lcom/estrongs/android/pop/app/FileChooserActivity$e;->a:Lcom/estrongs/android/pop/app/FileChooserActivity;

    const v1, 0x7f11029d

    invoke-virtual {p2, v1}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p1, p2, v0}, Lcom/estrongs/android/ui/dialog/q;->setCancelButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/widget/Button;

    .line 11
    invoke-virtual {p1}, Lcom/estrongs/android/ui/dialog/q;->show()V

    return-void

    .line 12
    :cond_0
    invoke-static {p1}, Lcom/estrongs/android/util/h0;->y1(Ljava/lang/String;)Z

    move-result p2

    if-eqz p2, :cond_1

    .line 13
    new-instance p2, Landroid/content/Intent;

    new-instance v1, Ljava/io/File;

    invoke-direct {v1, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-static {v1}, Landroid/net/Uri;->fromFile(Ljava/io/File;)Landroid/net/Uri;

    move-result-object p1

    invoke-direct {p2, v0, p1}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    goto :goto_0

    .line 14
    :cond_1
    new-instance p2, Landroid/content/Intent;

    invoke-static {p1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object p1

    invoke-direct {p2, v0, p1}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    .line 15
    :goto_0
    iget-object p1, p0, Lcom/estrongs/android/pop/app/FileChooserActivity$e;->a:Lcom/estrongs/android/pop/app/FileChooserActivity;

    const/4 v0, -0x1

    invoke-virtual {p1, v0, p2}, Landroid/app/Activity;->setResult(ILandroid/content/Intent;)V

    .line 16
    iget-object p1, p0, Lcom/estrongs/android/pop/app/FileChooserActivity$e;->a:Lcom/estrongs/android/pop/app/FileChooserActivity;

    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/FileChooserActivity;->finish()V

    return-void
.end method
